package com.cxb.serviceorder.remote;

import com.cxb.internalcommon.dto.PriceRule;
import com.cxb.internalcommon.dto.ResponseResult;
import com.cxb.internalcommon.request.PriceRuleIsNewRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("service-price")
@RequestMapping("/price-rule")
public interface ServicePriceClient {

    /**
     * 是否是最新计价规则
     * @param priceRuleIsNewRequest
     * @return
     */
    @PostMapping("/is-newest")
    public ResponseResult<Boolean> isNew(@RequestBody PriceRuleIsNewRequest priceRuleIsNewRequest);

    /**
     * 根据城市编码和对应车型查询计价规则是否存在
     * @param priceRule
     * @return
     */
    @PostMapping("/if-exists")
    public ResponseResult<Boolean> ifExists(@RequestBody PriceRule priceRule);
}
